﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="OrderManager.aspx.cs" Inherits="LotteryVote.OrderManager" %>

<%@ Register Src="~/Controls/Pager.ascx" TagPrefix="LV" TagName="Pager" %>
<%@ Register Src="~/Controls/OrderSearchBar.ascx" TagPrefix="LV" TagName="OrderSearch" %>
<asp:Content ID="Header" ContentPlaceHolderID="head" runat="server">
    <link href="Style/Order.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="main" runat="server">
    <LV:OrderSearch ID="lv_orderSearch" runat="server" />
    <div class="content">
        <asp:Repeater ID="rpt_betOrder" runat="server" OnItemDataBound="rpt_betOrder_ItemDataBound"
            OnItemCommand="rpt_betOrder_ItemCommand">
            <HeaderTemplate>
                <table cellpadding="0" cellspacing="0">
                    <thead>
                        <tr>
                            <td>
                                <%=GetGlobalResourceObject("Resource","No")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "OrderNo")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "CreateTime")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Name")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Num")%>
                            </td>
                            <td colspan="2">
                                <%=GetGlobalResourceObject("Resource", "GameType")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Company")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Amount")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Odds")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Net")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Turnover")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Commission")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "NetAmount")%>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource","IPAddress") %>
                            </td>
                            <td>
                                <%=GetGlobalResourceObject("Resource", "Function")%>
                            </td>
                        </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class='<%#Container.ItemIndex%2==0?"odd":""%> <%# Convert.ToInt32(Eval("Status"))==0?"cancel":"" %>'>
                    <td>
                        <%# Container.ItemIndex+1 %>
                    </td>
                    <td>
                        <%#Eval("OrderId") %>
                    </td>
                    <td>
                        <%#Eval("CreateTime") %>
                    </td>
                    <td>
                        <%#Eval("UserName") %>
                    </td>
                    <td>
                        <%#Eval("Num") %>
                    </td>
                    <td>
                        <%# FindGamePlayWay(Eval("GamePlayWayId")).GameType.GameName %>
                    </td>
                    <td>
                        <%# FindGamePlayWay(Eval("GamePlayWayId")).PlayWay.WayName %>
                    </td>
                    <td>
                        <%# FindCompany(Eval("CompanyId")).Name%>
                    </td>
                    <td>
                        <%#Eval("Amount") %>
                    </td>
                    <td>
                        <%#Eval("Odds") %>
                    </td>
                    <td <%# Convert.ToDouble(Eval("DropWater"))>0?"style='color:red'":"dd" %>>
                        <%#Eval("Net") %>
                    </td>
                    <td>
                        <%#Eval("TurnOver") %>
                    </td>
                    <td>
                        <%#Eval("Commission") %>
                    </td>
                    <td>
                        <%#Eval("NetAmount") %>
                    </td>
                    <td>
                        <%#Eval("IPAddress") %>
                    </td>
                    <td>
                        <asp:LinkButton ID="lbtn_cancel" runat="server" Text="<%$Resources:Resource,Cancel %>" OnClientClick="return confirm('Are you sure?')"
                            Visible='<%#Convert.ToInt32(Eval("Status"))!=0 %>' CommandName="cancel" CommandArgument='<%#Eval("OrderId") %>'></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr class="footer">
                    <%for (int i = 0; i < 8; i++)
                      {%>
                    <td>
                    </td>
                    <%} %>
                    <td>
                        <asp:Literal ID="ltl_amount" runat="server"></asp:Literal>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                        <asp:Literal ID="ltl_turnover" runat="server"></asp:Literal>
                    </td>
                    <td>
                        <asp:Literal ID="ltl_comm" runat="server"></asp:Literal>
                    </td>
                    <td>
                        <asp:Literal ID="ltl_netAmount" runat="server"></asp:Literal>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                </tbody></table>
            </FooterTemplate>
        </asp:Repeater>
        <asp:HiddenField ID="hd_seach" runat="server" />
    </div>
    <LV:Pager ID="lv_pager" runat="server" Class="pagerGray" />
</asp:Content>
